# def summ(*num,base=3):
#     total=0
#     for each in num:
#         total += each
#     return total*base
# print(summ(1,2,3,4,5,base=5))

def findstr(str1,str2):
    count=0
    po=0
    for n in range(len(str1)-1):
        if po > n:
            continue
        elif str1.find(str2,po)!=-1:
            po=str1.find(str2,po)+1
            count +=1
        else:
            continue
    return count
str1=input('请输入被查找的字符串：')
str2=input('请输入要查找的字符串：')
result=findstr(str1,str2)
if result ==0:
    print('没有找到指定的字符串！')
else:
    print('%s在%s中出现了%d次'%(str2,str1,result))